/* 
 * MySql DDL script for data integrity
 * 
 * This DDL script was generated automatically with the pmMDA generator. Do 
 * not modify the content. The content of the file will be overrwritten if
 * this script is regenerated.
 */
 
ALTER TABLE EMPLOYEE ADD CONSTRAINT EMPLOYEE_DEPARTMENT_IR 
  FOREIGN KEY (DEPARTMENT_FK)
  REFERENCES DEPARTMENT(ID)
  ON DELETE RESTRICT;

ALTER TABLE EMPLOYEE ADD CONSTRAINT EMPLOYEE_DEPARTMENT_EmployeeColumn_IR 
  FOREIGN KEY (DEPARTMENT_EmployeeColumn_FK)
  REFERENCES DEPARTMENT(ID)
  ON DELETE RESTRICT;

ALTER TABLE DEPARTMENT ADD CONSTRAINT DEPARTMENT_MANAGER_IR 
  FOREIGN KEY (MANAGER_FK)
  REFERENCES EMPLOYEE(ID)
  ON DELETE RESTRICT;

ALTER TABLE DEPARTMENT ADD CONSTRAINT DEPARTMENT_COMPANY_IR 
  FOREIGN KEY (COMPANY_FK)
  REFERENCES COMPANY(ID)
  ON DELETE RESTRICT;

ALTER TABLE DEPARTMENT ADD CONSTRAINT DEPARTMENT_COMPANY_DepartmentColumn_IR 
  FOREIGN KEY (COMPANY_DepartmentColumn_FK)
  REFERENCES COMPANY(ID)
  ON DELETE RESTRICT;

ALTER TABLE COMPANY ADD CONSTRAINT COMPANY_CHIEFEXECUTIVEOFFICER_IR 
  FOREIGN KEY (CHIEFEXECUTIVEOFFICER_FK)
  REFERENCES EMPLOYEE(ID)
  ON DELETE RESTRICT;

